package packets

type AddressType uint8
type ConnType uint8
type ScanType uint8
type State uint8
type PHY uint8
type Version string
type ModuleID uint16
type GwACK string

type AppMsgType string
type MAC [6]byte

const (
	Public AddressType = 0
	Random AddressType = 1
)

const (
	Passive ScanType = 0
	Active  ScanType = 1
)

const (
	Disconnect ConnType = 0
	Connect    ConnType = 1
)

const (
	Disconnected State = 0
	Connected    State = 1
)

const (
	PHY1M    PHY   = 0x01
	PHYCoded State = 0x04
)

//`mac版本`
const (
	Version3 string = "0103"
)

//`三类消息`
const (
	ChannelControl  string = "01"
	GatewayManager  string = "02"
	TerminalManager string = "03"
	IotAccessMsg    string = "0301"
)

//`通道` | `网关` | `终端` 三类消息
const (
	Hello           string = "0101"
	GerenalResponse string = "01ff"

	GatewayDevInfo        string = "0201"
	IotModuleRset         string = "0202"
	IotModuleStatusChange string = "0203"

	BleRequest              string = "0301"
	BleConfirm              string = "0301"
	BleResponse             string = "0302"
	BleGetConnDevList       string = "0303"
	BleCharacteristicNotice string = "0304"
	BleBoardcast            string = "0305"
	BleTerminalEvent        string = "0306"
)

//`TLV`
const (
	TLVIBeaconMsg    string = "0101"
	TLVBeaconMsg     string = "0106"
	TLVRFIDMsg       string = "0108"
	TLVGeneralIOTMsg string = "0109"

	TLVGatewayTypeMsg           string = "0201"
	TLVGatewaySNMsg             string = "0202"
	TLVGatewayMACMsg            string = "0203"
	TLVIotModuleMsg             string = "0204"
	TLVIotModuleSNMsg           string = "0205"
	TLVIotModuleMACMsg          string = "0206"
	TLVGatewayDescribeMsg       string = "0207"
	TLVIotModuleDescribeMsg     string = "0208"
	TLVIotModuleEventMsg        string = "0209"
	TLVServiceMsg               string = "020a"
	TLVCharacteristicMsg        string = "020b"
	TLVDeviceListMsg            string = "020c"
	TLVNotifyMsg                string = "020d"
	TLVScanMsg                  string = "020e"
	TLVScanRespMsg              string = "020f"
	TLVConnectMsg               string = "0210"
	TLVConnectRespMsg           string = "0212"
	TLVMainServiceReqMsg        string = "0213"
	TLVMainServiceRespMsg       string = "0214"
	TLVCharFindReqMsg           string = "0215"
	TLVCharFindRespMsg              string = "0216"
	TLVCharConfReqMsg           string = "0217"
	TLVCharConfRespMsg          string = "0218"
	TLVCharOptReqMsg            string = "0219"
	TLVCharOptRespMsg           string = "021a"
	TLVBroadcastMsg             string = "021b"
	TLVDisconnectMsg            string = "021c"
	TLVCharDescribeMsg          string = "021e"
	TLVMainServiceByUUIDReqMsg  string = "021f"
	TLVMainServiceByUUIDRespMsg string = "0220"
)

// `MessageHeader MessageAppHeader`
const (
	Request         string = "0001"
	RequireWithResp string = "0002"
	Response        string = "0003"
)
